profiler: Clean up profiler marks for frameclock
authorAlexander Larsson <alexl@redhat.com>
Wed, 12 Feb 2020 12:20:32 +0000 (13:20 +0100)
committerAlexander Larsson <alexl@redhat.com>
Wed, 12 Feb 2020 12:20:32 +0000 (13:20 +0100)
This drops the marks for before/after-paint as they are internal
things that very rarely use any time, and also flush/resume-events
as any events reported here will get separate marks so will be easy
to see anyway.

Also, we rename the entire frameclock cycle to "frameclock cycle"
rather than "paint_idle" which is rather cryptic.

gdk/gdkframeclock.c
gdk/gdkframeclockidle.c

index 940d39ca6d13fc537ddc48cfaad4c24980edff89..ee76368935c07b06ad7d89f6925e706cff7bc67f 100644 (file)
@@ -647,23 +647,13 @@ gdk_frame_clock_get_refresh_info (GdkFrameClock *frame_clock,
 void
 _gdk_frame_clock_emit_flush_events (GdkFrameClock *frame_clock)
 {
-  gint64 before = g_get_monotonic_time ();
-
   g_signal_emit (frame_clock, signals[FLUSH_EVENTS], 0);
-
-  if (GDK_PROFILER_IS_RUNNING)
-    gdk_profiler_end_mark (before, "frameclock", "flush-events");
 }
 
 void
 _gdk_frame_clock_emit_before_paint (GdkFrameClock *frame_clock)
 {
-  gint64 before = g_get_monotonic_time ();
-
   g_signal_emit (frame_clock, signals[BEFORE_PAINT], 0);
-
-  if (GDK_PROFILER_IS_RUNNING)
-    gdk_profiler_end_mark (before, "frameclock", "before-paint");
 }
 
 void
@@ -702,23 +692,13 @@ _gdk_frame_clock_emit_paint (GdkFrameClock *frame_clock)
 void
 _gdk_frame_clock_emit_after_paint (GdkFrameClock *frame_clock)
 {
-  gint64 before = g_get_monotonic_time ();
-
   g_signal_emit (frame_clock, signals[AFTER_PAINT], 0);
-
-  if (GDK_PROFILER_IS_RUNNING)
-    gdk_profiler_end_mark (before, "frameclock", "after-paint");
 }
 
 void
 _gdk_frame_clock_emit_resume_events (GdkFrameClock *frame_clock)
 {
-  gint64 before = g_get_monotonic_time ();
-
   g_signal_emit (frame_clock, signals[RESUME_EVENTS], 0);
-
-  if (GDK_PROFILER_IS_RUNNING)
-    gdk_profiler_end_mark (before, "frameclock", "resume-events");
 }
 
 static gint64
index 2a0dbd8f0785f9601098b5f9689a5c2dcf6ba2e9..2312e30b25e6c1b7901a42f9afc424e117319b2b 100644 (file)
@@ -502,7 +502,7 @@ gdk_frame_clock_paint_idle (void *data)
     priv->sleep_serial = get_sleep_serial ();
 
   if (GDK_PROFILER_IS_RUNNING)
-    gdk_profiler_end_mark (before, "frameclock", "paint_idle");
+    gdk_profiler_end_mark (before, "frameclock cycle", NULL);
 
   return FALSE;
 }
@@ -599,7 +599,7 @@ gdk_frame_clock_idle_thaw (GdkFrameClock *clock)
           if (priv->freeze_time != 0)
             {
               gdk_profiler_end_mark (priv->freeze_time,
-                                     "frameclock freeze", NULL);
+                                     "frameclock frozen", NULL);
               priv->freeze_time = 0;
             }
         }